﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ProjetReseau
{
    class Functions
    {
    

        public static string convertToBinary(string _s)
        {
            System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding();

            byte[] b = encoding.GetBytes(_s);
            string binaryString = "";

            foreach (byte bite in b)
            {
                binaryString += bite;
            }

            return binaryString;
        }
    }
}
